package com.wgchao.authmanager.infrastructure.jpa.repository;

import com.wgchao.authmanager.infrastructure.jpa.entity.MenuInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MenuInfoJpaRepository extends JpaRepository<MenuInfo, Long>, JpaSpecificationExecutor<MenuInfo> {

    void deleteAllByProjectIdentify(String projectIdentify);

    List<MenuInfo> findAllByProjectIdentify(String projectIdentify);

    MenuInfo findFirstByProjectIdentifyAndMenuIdentify(String projectIdentify, String menuIdentify);
}
